<template>
	<view class="invite-page">
		<view class="invite-bg">
			<view class="title">
				分享给你的朋友
			</view>
			<view class="text">
				Chat BaseX为你打开新世界的大门
			</view>
			<view class="code-box">
				<view class="code">
				</view>
			</view>
			<view class="copy-code">
				<view>
					邀请码
				</view>
				<view class="left" @click="copyCode">
					<view class="code-num">93376428</view>
					<u--image :showLoading="true" src="/static/my/copy.png" width="32rpx" height="32rpx"></u--image>
				</view>
			</view>
		</view>
		<view class="btn">
			<view></view>
			<view>
				复制链接
			</view>
			<u--image :showLoading="true" src="/static/my/invite-icon.png" width="40rpx" height="40rpx"></u--image>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				
			}
		},
		methods:{
			copyCode(){
				uni.setClipboardData({
					data: '93376428',
					success: function () {
						console.log('success');
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.invite-page{
		padding: 20rpx;
		.btn {
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 32rpx;
			background: linear-gradient(270deg, #87BAFF 0%, #6897FF 100%);
			padding: 30rpx 40rpx;
			color: #ffffff;
			border-radius: 50rpx;
			margin-top: 10%;
		}
		.invite-bg{
			height: 1060rpx;
			padding: 40rpx;
			background-image: url('/static/my/invite-bg.png');
			background-repeat: no-repeat;
			background-size: 100% 1060rpx;
			text-align: center;
			border-radius: 40rpx;
			.title {
				color: #ffffff;
				font-size: 32rpx;
			}
			.text {
				font-size: 26rpx;
				color: #cccccc;
				margin-top: 20rpx;
			}
			.code-box {
				margin-top: 35%;
				display: flex;
				align-items: center;
				justify-content: center;
				.code {
					width: 356rpx;
					height: 356rpx;
					background-color: #ffffff;
					border-radius: 30rpx;
					padding: 20rpx;
				}
			}
			.copy-code {
				margin-top: 40%;
				display: flex;
				justify-content: space-between;
				align-items: center;
				color: #ffffff;
				font-size: 32rpx;
				.left {
					display: flex;
					align-items: center;
					.code-num {
						margin-right: 20rpx;
					}
				}
			}
		}
	}
</style>